Skip to content

docs(pm-stack): Phase 2 design record — CF sync topology + edge relay (#8569) - #11241

Merged
dezren39 merged 1 commit into
mainfrom
queue/20170-8569-notify-phase2
Nov 18, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/20170-8569-notify-phase2

Conversation

@dezren39

@dezren39 dezren39 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

What

The Phase-2 design record for #8569: doc/2026-11-17_design_pm8569_notifications_phase2.md.

The parent design (pm-stack-notifications-design-2026-11-11.md) already ruled: board/aggregator to Workers is NO-GO; a small edge notification relay (one Worker + one pm-notify Durable Object) is GO. Phase 1 (#8568) is closed. This record decides the five things the ruling left open:

  1. Sync topology — event mirror: append-only per-event POST with a mirrorId idempotency key (retry until acked); subscription mirror: full-snapshot replace under a monotonic seq (self-healing, seq regression rejected); heartbeat: bidirectional — its response drains pending edge answers via pull/ack on every contact, with the Phase-1 catcher still the single ledger writer. A per-start stackEpoch makes recovery decidable at the edge.
  2. Relay/DO shape — singleton DO; storage for subscription snapshot, 30-day event mirror log, pending answers, heartbeat state; alarm at last-beat + 150s is the only scheduler (no cron); the Worker's route list is closed (everything else 404s).
  3. Board read path — none at the edge: board and its APIs stay laptop-only behind Tailscale Serve; the edge serves only answer pages and a minimal status stub. Episode semantics (one down push, one recovered push naming downtime) made mechanical via the epoch rule.
  4. Secrets by name — throat↔Worker shared secret, the existing VAPID keypair (custody moves to a Worker secret, subscriptions never re-register), per-question answer tokens (hash stored, value only in the push/URL), CF API token deploy-time only. No secret values anywhere in the record.
  5. Ordered implementation split — (1) relay skeleton + dead-man's switch (edge owns stack.silent from here), (2) event mirror as silent mirror with a soak check, (3) edge answer intake, (4) cron narrowing to the daily DO canary; any further send cutover is separately reviewed, outside this split.

Doc-only (one new file), treefmt-formatted. Queue task 20170 (lane code-a). No closing keyword for #8569 — the issue stays open as the Phase-2 program tracker; the worker updates it with the split.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 17, 2026 10:57
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T10:57:04.291223Z
We couldn’t complete this review. Comment @codex review to try again.
0956c60 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 27 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 24367c84-a38b-4331-af75-d41f0ff53b35
Commits

Reviewing files that changed from the base of the PR and between 99a6753 and 0956c60.

Files selected for processing: 1

  • doc/2026-11-17_design_pm8569_notifications_phase2.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dezren39
dezren39 merged commit b8a917e into main Nov 18, 2026
1 check passed
@dezren39
dezren39 deleted the queue/20170-8569-notify-phase2 branch November 18, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant